const fs = require("fs")

const express = require("express")
const morgan = require("morgan")

const app = express()

const writerStream = fs.createWriteStream("./logs/access.log", { flags: "a+" })

app.use(morgan("combined", { stream: writerStream }))

app.post("/home", (req, res, next) => {
  res.end("home");
})

app.listen(8000, () => {
  console.log("form-data 服务器启动成功");
})